#func Fibonacci

def fib(n):
    sum = [0,1] 
    for i in range(1,n+1):
        sum[0], sum[1] = sum[1], sum[0] + sum[1]
    return sum[0]

if __name__ == '__main__':
    n = int(input())
    print(fib(n))